<html>
<body>
Reports synchronization on <b>this</b> or <b>class</b> expressions.
Constructs reported include <b>synchronized</b> blocks, and calls to <b>wait()</b>,
<b>notify()</b> or <b>notifyAll()</b>.
<p>
There are several reasons synchronization on this or class expressions may be a bad idea:
First, it makes synchronization part of the external interface of the class.
This makes a future change to a different locking mechanism difficult.
Second, it makes it hard to track just who is locking on a given object.
And third , it makes a denial-of-service attack possible, either on purpose or it can happen easily by accident when subclassing.

<p>As an alternative, consider
synchronizing on a <b>private final</b> lock object, access to which can be completely controlled.
<!-- tooltip end -->
<p>

</body>
</html>